package com.reebake.ideal.user.client;

import com.reebake.ideal.user.entity.UserDetailsDTO;
import com.reebake.ideal.user.entity.UserRegisterDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

public interface UserDetailsClient {
    @GetMapping("/load-by-user-id")
    public UserDetailsDTO loadUserByUserId(String userId);

    @GetMapping("/load-by-username")
    public UserDetailsDTO loadUserByUsername(String username);

    @GetMapping("/load-by-phone-number")
    public UserDetailsDTO loadUserByPhoneNumber(String phoneNumber);

    @GetMapping("/load-by-email")
    public UserDetailsDTO loadUserByEmail(String email);

    @GetMapping("/load-by-third-party")
    public UserDetailsDTO loadUserByThirdParty(String uuid, String source);

    @PostMapping("/register")
    public String register(@RequestBody UserRegisterDTO userRegisterDTO);

    @PostMapping("/simple-register")
    public String simpleRegister(String id);

    @GetMapping("/exists-by-username")
    public Boolean existsByUsername(String username);

    @GetMapping("/exists-by-phone-number")
    public Boolean existsByPhoneNumber(String phoneNumber);

    @GetMapping("/exists-by-email")
    public Boolean existsByEmail(String email);

    @GetMapping("/exists-by-third-party")
    public Boolean existsByThirdParty(String uuid, String source);

    @PostMapping("bind-third-party-user")
    public void bindThirdPartyUser(String userId, String uuid, String source);

    @PostMapping("lock")
    public void lock(String username);
}
